<div class="focus" ui-view="container">
    <ol class="breadcrumb" style="font-size: 12px">
        <li>广告中心</li>
        <li>作弊管理</li>
        <li>封禁对象</li>
    </ol>
    <uib-tabset active="search.mode" >
        <uib-tab index="'ip'" heading="过滤IP地址"   ng-click="filterClick('ip')"></uib-tab>
        <uib-tab index="'cuid'" heading="过滤设备ID"   ng-click="filterClick('cuid')"></uib-tab>
        <input ims-select-range-time="rangeDate" type="text" style="padding: 7px;">
        <div style="float: right">
            <select ng-model="typeObj" class="select-style mt-2" ng-options="type.value for type in types" ng-change="typeChange(typeObj)" ng-init="typeObj=typeObj.type?typeObj:types[0]">
            </select>
        </div>
        <div class="row panel-row bg-white">
            <div class="search-operation pull-left" style="margin-left: 20px;">
                <a  ng-click="add()" class="bg-style"  title="添加">
                    添加
                </a>
                <a ng-click="reAllowSelect()"class="bg-style" title="取消关注">
                    取消关注
                </a>
            </div>
        </div>
    </uib-tabset>
    <div class="panel">
        <div class="table-responsive">
            <table class="table table-bordered table-hover">
                <thead>
                <tr>
                    <th><input type="checkbox" id="allCheck" class="magic-checkbox" ng-model="allChecked"
                               ng-change="allCheckedClick(allChecked)">
                        <label for="allCheck"></label></th>
                    <th ng-if="search.mode!='ip'">设备ID</th>
                    <th ng-if="search.mode=='ip'">IP</th>
                    <th>封禁类型</th>
                    <th>封禁时间</th>
                    <th>操作人</th>
                    <th>操作</th>

                </tr>
                </thead>
                <tbody>
                <tr ng-repeat="item in list">
                    <td><input type="checkbox" id="{{$index}}" class="magic-checkbox" ng-model="item.checked">
                        <label for="{{$index}}"></label></td>
                    <td ng-if="search.mode!='ip'">{{item.cuid}}</td>
                    <td ng-if="search.mode=='ip'">{{item.ip}}</td>

                    <td>{{table[item.type]}}</td>
                    <td>{{item.cTime}}</td>
                    <td>{{item.admin}}</td>

                    <td>
                        <a ng-click="reAllow(item.id)" class="time-out">取消封禁</a>
                    </td>
                </tr>
                </tbody>
            </table>
        </div>
    </div>
    <div class="panel-footer">
        <s-pagination conf="paginationConf"></s-pagination>
    </div>
    <!--<a ui-sref="campaigns.detail({campaignsId:1})"  ui-sref-opts="{inherit:false}">aaaaa</a>-->

    <script type="text/ng-template" id="disallowAdd.html">
        <div class="modal-header">
            <button type="button" class="close" ng-click="cancel()"><span>&times;</span></button>
            <span class="modal-title">关注添加</span>
        </div>
        <div class="modal-body reset-password">
            <div class="control-group text-align-left" ng-if="mode!='ip'">
                <label class="control-label form-require">设备ID:</label>
                <div class="controls">
                    <input type="text" placeholder="设备ID" ng-model="disallow.cuid">
                </div>
            </div>
            <div class="control-group text-align-left" ng-if="mode=='ip'">
                <label class="control-label form-require">IP地址:</label>
                <div class="controls">
                    <input type="text" placeholder="IP" ng-model="disallow.ip">
                </div>
            </div>
        </div>
        <div class="modal-footer">
            <button class="btn btn-primary" type="button" ng-click="ok()">{{'确定'}}</button>
            <button class="btn ims-btn" type="button" ng-click="cancel()">{{'取消'}}</button>
        </div>

    </script>

</div>
